---
title: "Installation"
description: "Install mcp_use and get your development environment ready"
icon: "download"
---

<Info>
  **Prerequisites**:
  - Install [Node.js](https://nodejs.org/) (version 18 or higher)
  - npm, pnpm, or yarn package manager
</Info>

### MCP Servers

The fastest way to scaffold a new MCP server project is to use `create-mcp-use-app`:

<CodeGroup>
```bash npm
npx create-mcp-use-app my-mcp-server
cd my-mcp-server
npm run dev
```

```bash pnpm
pnpm create mcp-use-app my-mcp-server
cd my-mcp-server
pnpm dev
```

```bash yarn
yarn create mcp-use-app my-mcp-server
cd my-mcp-server
yarn dev
```
</CodeGroup>

This command will:
- Create a new directory with your project name
- Initialize a TypeScript project with mcp-use configured
- Set up a basic MCP server template with example tools
- Install all dependencies automatically

<Tip>
Check out [UI Widgets](/typescript/server/ui-widgets) with support to MCP-UI and OpenAI Apps SDK for ChatGPT.
</Tip>

You can also install mcp-use as a library and build your own MCP server from scratch.
<CodeGroup>
```bash npm
npm install mcp-use
```

```bash pnpm
pnpm add mcp-use
```

```bash yarn
yarn add mcp-use
```
</CodeGroup>

```typescript
import { MCPServer } from "mcp-use/server";
import { z } from "zod";

const server = new MCPServer({
  name: "my-server",
  version: "1.0.0",
  description: "My custom MCP server",
});

// Define a tool
server.tool("get_weather", {
  description: "Get weather for a city",
  parameters: z.object({
    city: z.string().describe("City name"),
  }),
  execute: async ({ city }) => {
    return { temperature: 72, condition: "sunny", city };
  },
});

// Start server with auto-inspector
server.listen(3000);
// 🎉 Inspector at http://localhost:3000/inspector
```

Check out the examples [here](https://github.com/mcp-use/mcp-use/tree/main/examples/server).

Visit the [MCP Server](/typescript/server) documentation for more details.

### MCP Agent & Client

Install mcp_use using your preferred package manager:

<CodeGroup>
```bash npm
npm install mcp-use
```

```bash pnpm
pnpm add mcp-use
```

```bash yarn
yarn add mcp-use
```
</CodeGroup>

## Next Steps

<CardGroup cols={3}>
  <Card title="Agent" icon="brain" href="/typescript/agent">
    Build AI Agents with tool calling capabilities through MCP connections
  </Card>
  <Card title="Client" icon="router" href="/typescript/client">
    A full featured MCP Client implementation for TypeScript
  </Card>
  <Card title="Server" icon="server" href="/typescript/server">
    The MCP Server framework implementation for TypeScript, with Apps SDK and MCP-UI support
  </Card>
</CardGroup>

<Tip>
**Need Help?** Join our [Discord](https://discord.gg/XkNkSkMz3V) or [Github](https://github.com/mcp-use/mcp-use) communities.
</Tip>
